#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1e5 + 5;
int t, n, k, x;
priority_queue <double> q;
unordered_map <double, int> mp;
signed main() {
    scanf("%lld", &t);
    while (t--) {
        scanf("%lld%lld%lld", &n, &k, &x);
        while (!q.empty()) q.pop();
        mp.clear();
        for (int i = 1;i <= n;i++) {
            double x;
            scanf("%lf", &x);
            if (!mp[x]) q.push(x);
            mp[x]++;
        }
        while (k) {
            double u = q.top();q.pop();
            double v = u / 2;
            if (!mp[v]) q.push(v);
            if (k <= mp[u]) {
                mp[v] += k * 2, mp[u] -= k;
                if (mp[u]) q.push(u);
                break;
            }
            k -= mp[u], mp[v] += mp[u] * 2, mp[u] = 0;
        }
        while (x) {
            if (x <= mp[q.top()]) { printf("%.20lf\n", q.top());break; }
            x -= mp[q.top()], q.pop();
        }
    }
    return 0;
}